<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title></title>
<meta http-equiv='content-type' content='text/html;charset=utf-8' />
<style>
#right_top{
	height:60px;
	line-height:60px;
	font-size:18px;
	color:#0B55C4;
	font-weight:bold;
	
}
#right_top #img{
	float:left;
	width:42px;
	padding:8px;
}
#right_top #img_text{
	float:left;
	width:660px;
	text-indent:20px;
}
#right_top_left{
	float:left;
	width:100px;
}
#right_top_right{
	float:right;
	width:100px;
}
table{
	width:680px;
	border:1px solid #eee;
	border-collapse:collapse;
}
table tr td{
	height:30px;
	border:1px solid #ddd;
	text-align:center;
}
#tr_first{
	background-color:#F0F0F0;
	color:blue;
	font-weight:bold;
}
</style>
</head>
<body>
<form action='__URL__/delete' method="post" id='delete'>
	<div id='right_top'>
		<div id='img'>
			<img src='__PUBLIC__/images/menu.png' />
		</div>
		<div id='img_text'>
			<div id='right_top_left'>
				栏目管理
			</div>
			<div id='right_top_right'>
				<a href='__URL__/create'>创建</a>
				<a onclick="return checkForm();" href='#'>删除</a>
			</div>
		</div>
	</div>
	<table>
		<tr id='tr_first'>
			<td>ID</td>
			<td>勾选</td>
			<td>标题</td>
			<td>状态</td>
		</tr>
	<volist name='data' id='vo'>
		<tr>
			<td><{$vo.id}></td>
			<td><input type='checkbox' value="<{$vo.id}>" name="menubox[]" /></td>
			<td><a href='__URL__/edit/id/<{$vo.id}>'><{$vo.title}></a></td>
			<td>
				<if condition='($vo.status eq 1)'>
					<img src='__PUBLIC__/images/tick.png'>
				<else />
					<img src='__PUBLIC__/images/publish_x.png'>
				</if>
			</td>
		</tr>
	</volist>
	</table>
</form>
<script>
function checkForm()
{
	var str=document.getElementsByName("menubox[]");
	var length=str.length;
	var value="";
	for(i=0; i<length; i++)
	{
		if(str[i].checked == true)
		{
			value += str[i].value;
		}
	}
	if(value=="")
	{
		alert("请选择要删除的栏目");
		return false;
	}
	else
	{
		document.getElementById("delete").submit();
		return true;
	}
}
</script>
</body>
</html>